﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="LoanInfo.aspx.cs" Inherits="LoanInfo" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
    
    <asp:Panel ID="Panel0" runat="server" GroupingText="Sumarul Imprumutului" CssClass="groupDataPanel"  style="width:48%; float:left;" > 
        <dl>         
            <dt class="part"  style="width:250px;">Data de debursare:</dt>
            <dd class="part"><asp:Label ID="dataEliberariiNumerarLabel" runat="server" Text="*******"></asp:Label></dd>

            <dt class="inpart"  style="width:250px;">Valuta: </dt>
            <dd class="inpart"><asp:Label ID="currencyLabel" runat="server" Text="*******"></asp:Label></dd>

            <dt class="part"  style="width:250px;">Managerul de creditare:</dt>
            <dd class="part"><asp:Label ID="loanManagerLabel" runat="server" Text="*******"></asp:Label></dd>   

            <dt class="inpart"  style="width:250px;">Codul creditului: </dt>
            <dd class="inpart"><asp:Label ID="loanIDLabel" runat="server" Text="*******"></asp:Label></dd>
        </dl>
    </asp:Panel>

    <asp:Panel ID="Panel1" runat="server" GroupingText="&nbsp;" CssClass="groupDataPanel"  style="width:48%; float:left;" > 
        <dl>         
            <dt class="part" style="width:250px;">Scopul creditului:</dt>
            <dd class="part"><asp:Label ID="loanScopeLabel" runat="server" Text="*******"></asp:Label></dd>

            <dt class="inpart"  style="width:250px;">Suma aprobata: </dt>
            <dd class="inpart"><asp:Label ID="loanApruvedAmountLabel" runat="server" Text="*******"></asp:Label></dd>

            <dt class="part"  style="width:250px;">Suma eliberata:</dt>
            <dd class="part"><asp:Label ID="loanDebursedAmountLabel" runat="server" Text="*******"></asp:Label></dd>   

            <dt class="inpart"  style="width:250px;"> </dt>
            <dd class="inpart"></dd>
        </dl>
    </asp:Panel>

    <div class="clear"></div>
    <ajax:TabContainer ID="detailsLoanTabContainer"  runat="server" cssclass="ajax__myTab"  Width="100%" ActiveTabIndex="0">  
        <ajax:TabPanel ID="accountDetailTabPanel" runat="server">
            <HeaderTemplate>&nbsp; Account Detail &nbsp;</HeaderTemplate>
            <ContentTemplate>
                <div style="float: left; width: 95%;">

                    <asp:Panel ID="accountDetailPanel" runat="server" Visible="true">
                        <div class="table">
                            <div class="row alt" id="1">
                                <div class="cell">Repayment Strategy</div>
                                <div class="cell">
                                    <asp:Label runat="server" ID="repaymentStrategyLabel"></asp:Label>
                                </div>
                            </div>
                            <div class="row" id="Div1">
                                <div class="cell">Repayments</div>
                                <div class="cell">
                                    <asp:Label runat="server" ID="repaymentsLabel"></asp:Label>
                                </div>
                            </div>
                            <div class="row alt" id="Div2">
                                <div class="cell">Amortization</div>
                                <div class="cell">
                                    <asp:Label runat="server" ID="amortizationLabel"></asp:Label>
                                </div>
                            </div>
                            <div class="row" id="Div3">
                                <div class="cell">Interest</div>
                                <div class="cell">
                                    <asp:Label runat="server" ID="interestLabel"></asp:Label>
                                </div>
                            </div>
                            <div class="row alt" id="Div4">
                                <div class="cell">Grace: On Principal Payment</div>
                                <div class="cell">
                                    <asp:Label runat="server" ID="gracePrincipalLabel"></asp:Label>
                                </div>
                            </div>
                            <div class="row" id="Div5">
                                <div class="cell">Grace: On Interest Payment</div>
                                <div class="cell">
                                    <asp:Label runat="server" ID="graceInterestLabel"></asp:Label>
                                </div>
                            </div>
                            <div class="row alt" id="Div6">
                                <div class="cell">Grace on Arrears Ageing</div>
                                <div class="cell">
                                    <asp:Label runat="server" ID="graceArrearsLabel"></asp:Label>
                                </div>
                            </div>
                            <div class="row" id="Div7">
                                <div class="cell">Fund Source</div>
                                <div class="cell">
                                    <asp:Label runat="server" ID="fundSourceLabel"></asp:Label>
                                </div>
                            </div>
                            <div class="row alt" id="Div8">
                                <div class="cell">Interest Free Period</div>
                                <div class="cell">
                                    <asp:Label runat="server" ID="interestFreePeriodLabel"></asp:Label>
                                </div>
                            </div>
                            <div class="row" id="Div9">
                                <div class="cell">Interest Calculation Period</div>
                                <div class="cell">
                                    <asp:Label runat="server" ID="interestCalculationPeriodLabel"></asp:Label>
                                </div>
                            </div>
                            <div class="row alt" id="Div10">
                                <div class="cell">Interest Type</div>
                                <div class="cell">
                                    <asp:Label runat="server" ID="interestTypeLabel"></asp:Label>
                                </div>
                            </div>
                            <div class="row" id="Div11">
                                <div class="cell">Submitted on</div>
                                <div class="cell">
                                    <asp:Label runat="server" ID="submittedOnLabel"></asp:Label>
                                </div>
                            </div>
                            <div class="row alt" id="Div12">
                                <div class="cell">Approved on</div>
                                <div class="cell">
                                    <asp:Label runat="server" ID="approvedOnLabel"></asp:Label>
                                </div>
                            </div>
                            <div class="row" id="Div13">
                                <div class="cell">Disbursed on</div>
                                <div class="cell">
                                    <asp:Label runat="server" ID="disbursedOnLabel"></asp:Label>
                                </div>
                            </div>
                            <div class="row alt" id="Div14">
                                <div class="cell">Matures on</div>
                                <div class="cell">
                                    <asp:Label runat="server" ID="matureseOnLabel"></asp:Label>
                                </div>
                            </div>
                        </div>
                    </asp:Panel>

                </div>
            </ContentTemplate>
        </ajax:TabPanel>
        <ajax:TabPanel runat="server" ID="summaryTabPanel">
            <HeaderTemplate>&nbsp; Summary &nbsp;</HeaderTemplate>
            <ContentTemplate>
                <div style="float: left; width: 95%;">

                    <asp:Panel ID="summaryPanel" runat="server" Visible="true">
                        <div class="table" id="divTableSummary">
                            <div class="row alt text_bold" id="divCaptioinSummary">
                                <div class="cell">&nbsp;</div>
                                <div class="cell">Original</div>
                                <div class="cell">Paid</div>
                                <div class="cell">Waived</div>
                                <div class="cell">Written Off</div>
                                <div class="cell">Outstanding</div>
                                <div class="cell">Over Due</div>
                            </div>
                            <div class="row text_right" id="divPrincipalSummary">
                                <div class="cell text_bold">Principal</div>
                                <div class="cell">
                                    <asp:Label runat="server" ID="principalOriginalLabel"></asp:Label>
                                </div>
                                <div class="cell">
                                    <asp:Label runat="server" ID="principalPaidLabel"></asp:Label>
                                </div>
                                <div class="cell">
                                    <asp:Label runat="server" ID="principalWaivedLabel"></asp:Label>
                                </div>
                                <div class="cell">
                                    <asp:Label runat="server" ID="principalWrittenOffLabel"></asp:Label>
                                </div>
                                <div class="cell">
                                    <asp:Label runat="server" ID="principalOutstandingLabel"></asp:Label>
                                </div>
                                <div class="cell">
                                    <asp:Label runat="server" ID="principalOverDueLabel"></asp:Label>
                                </div>
                            </div>
                            <div class="row alt text_right" id="divInterestSummary">
                                <div class="cell text_bold">Interest</div>
                                <div class="cell">
                                    <asp:Label runat="server" ID="interestOriginalLabel"></asp:Label>
                                </div>
                                <div class="cell">
                                    <asp:Label runat="server" ID="interestPaidLabel"></asp:Label>
                                </div>
                                <div class="cell">
                                    <asp:Label runat="server" ID="interestWaivedLabel"></asp:Label>
                                </div>
                                <div class="cell">
                                    <asp:Label runat="server" ID="interestWrittenOffLabel"></asp:Label>
                                </div>
                                <div class="cell">
                                    <asp:Label runat="server" ID="interestOutstandingLabel"></asp:Label>
                                </div>
                                <div class="cell">
                                    <asp:Label runat="server" ID="interestOverDueLabel"></asp:Label>
                                </div>
                            </div>
                            <div class="row text_right" id="divFeesSummary">
                                <div class="cell text_bold">Fees</div>
                                <div class="cell">
                                    <asp:Label runat="server" ID="feesOriginalLabel"></asp:Label>
                                </div>
                                <div class="cell">
                                    <asp:Label runat="server" ID="feesPaidLabel"></asp:Label>
                                </div>
                                <div class="cell">
                                    <asp:Label runat="server" ID="feesWaivedLabel"></asp:Label>
                                </div>
                                <div class="cell">
                                    <asp:Label runat="server" ID="feesWrittenOffLabel"></asp:Label>
                                </div>
                                <div class="cell">
                                    <asp:Label runat="server" ID="feesOutstandingLabel"></asp:Label>
                                </div>
                                <div class="cell">
                                    <asp:Label runat="server" ID="feesOverDueLabel"></asp:Label>
                                </div>
                            </div>
                            <div class="row alt text_right" id="divPenaltiesSummary">
                                <div class="cell text_bold">Penalties</div>
                                <div class="cell">
                                    <asp:Label runat="server" ID="penaltiesOriginalLabel"></asp:Label>
                                </div>
                                <div class="cell">
                                    <asp:Label runat="server" ID="penaltiesPaidLabel"></asp:Label>
                                </div>
                                <div class="cell">
                                    <asp:Label runat="server" ID="penaltiesWaivedLabel"></asp:Label>
                                </div>
                                <div class="cell">
                                    <asp:Label runat="server" ID="penaltiesWrittenOffLabel"></asp:Label>
                                </div>
                                <div class="cell">
                                    <asp:Label runat="server" ID="penaltiesOutstandingLabel"></asp:Label>
                                </div>
                                <div class="cell">
                                    <asp:Label runat="server" ID="penaltiesOverDueLabel"></asp:Label>
                                </div>
                            </div>
                            <div class="row text_right text_bold" id="divTotalSummary">
                                <div class="cell text_bold">Total</div>
                                <div class="cell">
                                    <asp:Label runat="server" ID="totalOriginalLabel"></asp:Label>
                                </div>
                                <div class="cell">
                                    <asp:Label runat="server" ID="totalPaidLabel"></asp:Label>
                                </div>
                                <div class="cell">
                                    <asp:Label runat="server" ID="totalWaivedLabel"></asp:Label>
                                </div>
                                <div class="cell">
                                    <asp:Label runat="server" ID="totalWrittenOffLabel"></asp:Label>
                                </div>
                                <div class="cell">
                                    <asp:Label runat="server" ID="totalOutstandingLabel"></asp:Label>
                                </div>
                                <div class="cell">
                                    <asp:Label runat="server" ID="totalOverDueLabel"></asp:Label>
                                </div>
                            </div>
                        </div>
                    </asp:Panel>

                </div>
            </ContentTemplate>
        </ajax:TabPanel>
        <ajax:TabPanel runat="server" ID="repaymentScheduleTabPanel">
            <HeaderTemplate>&nbsp; Repayment Schedule &nbsp;</HeaderTemplate>
            <ContentTemplate>
                <div style="float: left;">
                    <asp:Panel ID="repaymentSchedulePanel" runat="server">

                        <asp:GridView ID="refundGridView" runat="server" AutoGenerateColumns="False">
                            <AlternatingRowStyle CssClass="alt" />
                            <Columns>
                                <asp:BoundField DataField="iterationID" HeaderText=" # " >
                                <ItemStyle HorizontalAlign="Right" />
                                </asp:BoundField>
                                <asp:BoundField DataField="days" HeaderText=" # Days " >
                                <ItemStyle HorizontalAlign="Right" />
                                </asp:BoundField>
                                <asp:BoundField DataField="dateID" HeaderText=" Date " DataFormatString="{0:d MMMM yyyy}" HtmlEncode="False" />
                                <asp:BoundField DataField="PaidDate" HeaderText=" Paid Date " DataFormatString="{0:d MMMM yyyy}" HtmlEncode="False" />
                                <asp:CheckBoxField DataField="isFinID" />
                                <asp:BoundField DataField="principalDueID" HeaderText=" Principal Due " DataFormatString="{0:0.00}" >
                                <ItemStyle HorizontalAlign="Right" />
                                </asp:BoundField>
                                <asp:BoundField DataField="balanceOfLoan" HeaderText=" Balance " DataFormatString="{0:0.00}" >
                                <ItemStyle HorizontalAlign="Right" />
                                </asp:BoundField>
                                <asp:BoundField DataField="interestID" HeaderText=" Interest " DataFormatString="{0:0.00}" >
                                <ItemStyle HorizontalAlign="Right" />
                                </asp:BoundField>
                                <asp:BoundField DataField="feesID" HeaderText=" Ex. Rate " DataFormatString="{0:0.00}" >
                                <ItemStyle HorizontalAlign="Right" />
                                </asp:BoundField>
                                <asp:BoundField DataField="penaltiesID" HeaderText=" Penalties " DataFormatString="{0:0.00}" >
                                <ItemStyle HorizontalAlign="Right" />
                                </asp:BoundField>
                                <asp:BoundField DataField="dueID" HeaderText=" Due " DataFormatString="{0:0.00}" >
                                <ItemStyle HorizontalAlign="Right" />
                                </asp:BoundField>
                                <asp:BoundField DataField="paidID" HeaderText=" Paid " DataFormatString="{0:0.00}" >
                                <ItemStyle HorizontalAlign="Right" />
                                </asp:BoundField>
                                <asp:BoundField DataField="inAdvanceID" HeaderText=" In Advance " DataFormatString="{0:0.00}" >
                                <ItemStyle HorizontalAlign="Right" />
                                </asp:BoundField>
                                <asp:BoundField DataField="lateID" HeaderText=" Late " DataFormatString="{0:0.00}" >
                                <ItemStyle HorizontalAlign="Right" />
                                </asp:BoundField>
                                <asp:BoundField DataField="outstandingID" HeaderText=" Outstanding " DataFormatString="{0:0.00}" >
                                <ItemStyle HorizontalAlign="Right" />
                                </asp:BoundField>
                            </Columns>
                        </asp:GridView>
                        
                    </asp:Panel>
                </div>
            </ContentTemplate>
        </ajax:TabPanel>
        <ajax:TabPanel runat="server" ID="transactionsTabPanel">
            <HeaderTemplate>&nbsp; Transactions &nbsp;</HeaderTemplate>
            <ContentTemplate>
                <div style="float: left; width: 95%;">
                    <asp:Panel ID="transactionsPanel" runat="server" Visible="true">
                        <asp:HyperLink runat="server" ID="exportTransactionHyperLinkID" Text="EXPORT" Target="_blank"></asp:HyperLink>
                        <asp:GridView ID="tranzactionGridView" runat="server" AutoGenerateColumns="false" ShowFooter="true" 
                            caption="Tranzactions Activity"        >
                            <AlternatingRowStyle CssClass="alt" />
                            <Columns>
                                <asp:BoundField DataField="TranzactionID" HeaderText=" ID " />
                                <asp:BoundField DataField="TranzactionsOffice" HeaderText=" Office " />                                
                                <asp:TemplateField HeaderText=" Tranzaction Date " ItemStyle-HorizontalAlign="Right" FooterStyle-HorizontalAlign="Right">
                                    <ItemTemplate>
                                        <asp:Label ID="TranzactionDateLabelID" runat="server" Text='<%# Bind("TranzactionDate","{0:dd MMMM yyyy}") %>'></asp:Label>
                                    </ItemTemplate>
                                    <FooterTemplate>
                                        <asp:Label ID="fTranzactionDate" runat="server" Text='<%# string.Format("{0:dd MMMM yyyy}", fTranzactionDate) %>'></asp:Label>
                                    </FooterTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText=" Transaction Type " ItemStyle-HorizontalAlign="Center" FooterStyle-HorizontalAlign="Center">
                                    <ItemTemplate>
                                        <asp:Label ID="TranzactionAmountLabelID" runat="server" Text='<%# Bind("Type") %>'></asp:Label>
                                    </ItemTemplate>
                                    <FooterTemplate>
                                        <asp:Label ID="fTranzactionDate" runat="server" Text="Disbursment"></asp:Label>
                                    </FooterTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText=" Amount " ItemStyle-HorizontalAlign="Right" FooterStyle-HorizontalAlign="Right">
                                    <ItemTemplate>
                                        <asp:Label ID="TranzactionAmount" runat="server" Text='<%# Bind("Amount","{0:0.00}") %>'></asp:Label>
                                    </ItemTemplate>
                                    <FooterTemplate>
                                        <asp:Label ID="fTranzactionDate" runat="server" Text='<%# string.Format("{0:0.00}", fTranzactionAmount) %>' ></asp:Label>
                                    </FooterTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="Principal" HeaderText=" Principal " DataFormatString="{0:0.00}" HtmlEncode="false" ItemStyle-HorizontalAlign="Right" />
                                <asp:BoundField DataField="Interest" HeaderText=" Interest " DataFormatString="{0:0.00}" HtmlEncode="false" ItemStyle-HorizontalAlign="Right" />
                                <asp:BoundField DataField="Fees" HeaderText=" Ex. Rate " DataFormatString="{0:0.00}" HtmlEncode="false" ItemStyle-HorizontalAlign="Right" />
                                <asp:BoundField DataField="Penalties" HeaderText=" Penalties " DataFormatString="{0:0.00}" HtmlEncode="false" ItemStyle-HorizontalAlign="Right" />
                                <asp:BoundField DataField="Rate" HeaderText=" Curs " ItemStyle-HorizontalAlign="Right" />
                                
                            </Columns>
                        </asp:GridView>

                    </asp:Panel>
                </div>

            </ContentTemplate>
        </ajax:TabPanel>
        <ajax:TabPanel runat="server" ID="loanDocumentsTabPanel">
            <HeaderTemplate>&nbsp; Loan Documnets &nbsp;</HeaderTemplate>
            <ContentTemplate>
                <div style="float: left; width: 95%;">
                    <asp:Panel ID="loanDocumentsPanel" runat="server" Visible="true">
                       
                    </asp:Panel>
                </div>
            </ContentTemplate>
        </ajax:TabPanel>

    </ajax:TabContainer>
	 

	
	

	


</asp:Content>

